From e457a7823cf9576eba7fea2364db1a7ceb676d3f Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 15 Oct 2018 10:45:57 -0700 Subject: [PATCH] Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite. --- gdk/quartz/gdksurface-quartz.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdk/quartz/gdksurface-quartz.c b/gdk/quartz/gdksurface-quartz.c index c635a6386a..ff7c62a688 100644 --- a/gdk/quartz/gdksurface-quartz.c +++ b/gdk/quartz/gdksurface-quartz.c @@ -134,8 +134,10 @@ gdk_surface_impl_quartz_get_context (GdkSurfaceImplQuartz *surface_impl, if (![surface_impl->view lockFocusIfCanDraw]) return NULL; } - - cg_context = [[NSGraphicsContext currentContext] graphicsPort]; + if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE) + cg_context = [[NSGraphicsContext currentContext] graphicsPort]; + else + cg_context = [[NSGraphicsContext currentContext] CGContext]; CGContextSaveGState (cg_context); CGContextSetAllowsAntialiasing (cg_context, antialias); -- 2.30.2